<template>
	<view class="con">
		<uni-collapse ref="collapse" class="list">
			<uni-collapse-item :title="item.t" v-for="(item, index) in list" :key="index">
				<view class="list_box">
					<view class="list_box_nr" v-for="(ttem, idx) in item.child" :key="idx">
						<view class="list_box_nr_left">
							<view class="list_box_nr_left_title">{{ttem.title}}</view>
							<view class="list_box_nr_left_text">
								<view class="list_box_nr_left_text_left">订单编号：</view>
								<view class="list_box_nr_left_text_right">{{ ttem.order_number }}</view>
							</view>
							<view class="list_box_nr_left_text">
								<view class="list_box_nr_left_text_left">房费几晚：</view>
								<view class="list_box_nr_left_text_right">{{ ttem.jiwan }}晚</view>
							</view>
							<view class="list_box_nr_left_text">
								<view class="list_box_nr_left_text_left">平台抽佣：</view>
								<view class="list_box_nr_left_text_right span">¥{{ ttem.cyprice }}</view>
							</view>
							<view class="list_box_nr_left_text">
								<view class="list_box_nr_left_text_left">下单时间：</view>
								<view class="list_box_nr_left_text_right">{{ ttem.create_time }}</view>
							</view>
						</view>
						<view class="list_box_nr_right">
							<view class="list_box_nr_right_title">实收金额</view>
							<view class="list_box_nr_right_text">¥{{ ttem.price }}</view>
						</view>
					</view>
				</view>
			</uni-collapse-item>
		</uni-collapse>

		<!-- 	<view :class="item.status == 2 ? '' : ''">
			<view class="list_title" @click="listclick(index, item.status)">
				{{ item.t }}
				<image class="list_title_img" src="/static/8.png" mode="" v-if="item.status == 2"></image>
				<image class="list_title_img img2" src="/static/8.png" mode="" v-else></image>
			</view>
		</view> -->
	</view>
</template>

<script setup>
	const http = inject('$http')
	let list = ref([])

	const indexlist = async () => {
		await http.post('/srapi/keyuan/srrecord').then((res) => {
			console.log('返回值', res.data)
			list.value = res.data
		})
	}

	onLoad((option) => {
		console.log('接收传参:', option)
		indexlist()
	})
</script>

<style lang="less" scoped>
	.con {
		padding: 20rpx;
	}
	.list {
		background: #ffffff;
		border-radius: 24rpx;
	}

	.list_box {
		padding: 0 30rpx;
		.list_box_nr {
			padding: 30rpx 0;
			border-bottom: 1px solid #f5f6fa;
			display: flex;
			justify-content: space-between;
			align-items: flex-start;
			.list_box_nr_left {
				.list_box_nr_left_title {
					font-size: 24rpx;
					font-weight: 500;
					color: #000000;
					margin-bottom: 15rpx;
				}
				.list_box_nr_left_text {
					display: flex;
					align-items: center;
					padding-top: 15rpx;
					.list_box_nr_left_text_left {
						font-size: 20rpx;
						font-weight: 500;
						color: #787878;
					}
					.list_box_nr_left_text_right {
						font-size: 20rpx;
						font-weight: 500;
						color: #000000;
					}
					.span {
						color: #3475f3;
					}
				}
			}
			.list_box_nr_right {
				.list_box_nr_right_title {
					font-size: 20rpx;
					font-weight: 500;
					color: #787878;
				}
				.list_box_nr_right_text {
					font-size: 28rpx;
					font-weight: 500;
					color: #f05e1c;
				}
			}
		}
	}
	//
</style>
